.class public Lcom/netease/newsreader/activity/AccountRegister;
.super Lcom/netease/newsreader/activity/BaseActivity;
.source "AccountRegister.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/activity/AccountRegister$RegisterHandler;
    }
.end annotation


# instance fields
.field private final INVALIDPASSWORD:I

.field private final INVALIDUSERNAME:I

.field private final PASSWORDNULL:I

.field private final REGACCOUNTINVAILD:I

.field private final REGFAIL:I

.field private final REGSUCCESS:I

.field private final UNACTIVIENET:I

.field private final USEREXIST:I

.field private final USERNAMENULL:I

.field private loginsuccess:Z

.field private password:Ljava/lang/String;

.field private passwordVisiblyListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;

.field private proDialog:Landroid/app/ProgressDialog;

.field private regPassword:Landroid/widget/EditText;

.field private regSubmit:Landroid/widget/Button;

.field private regUserName:Landroid/widget/EditText;

.field registerHandler:Landroid/os/Handler;

.field private registerListener:Landroid/view/View$OnClickListener;

.field private register_box:Landroid/widget/CheckBox;

.field private rst:Ljava/lang/String;

.field private username:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 44
    invoke-direct {p0}, Lcom/netease/newsreader/activity/BaseActivity;-><init>()V

    .line 57
    const/4 v0, 0x0

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->UNACTIVIENET:I

    .line 58
    const/4 v0, 0x1

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->USERNAMENULL:I

    .line 59
    const/4 v0, 0x2

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->INVALIDUSERNAME:I

    .line 60
    const/4 v0, 0x3

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->PASSWORDNULL:I

    .line 61
    const/4 v0, 0x4

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->INVALIDPASSWORD:I

    .line 62
    const/4 v0, 0x5

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->REGSUCCESS:I

    .line 63
    const/4 v0, 0x6

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->USEREXIST:I

    .line 64
    const/4 v0, 0x7

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->REGFAIL:I

    .line 65
    const/16 v0, 0x8

    iput v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->REGACCOUNTINVAILD:I

    .line 93
    new-instance v0, Lcom/netease/newsreader/activity/AccountRegister$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/AccountRegister$1;-><init>(Lcom/netease/newsreader/activity/AccountRegister;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerListener:Landroid/view/View$OnClickListener;

    .line 113
    new-instance v0, Lcom/netease/newsreader/activity/AccountRegister$2;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/AccountRegister$2;-><init>(Lcom/netease/newsreader/activity/AccountRegister;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->passwordVisiblyListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;

    .line 162
    new-instance v0, Lcom/netease/newsreader/activity/AccountRegister$3;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/AccountRegister$3;-><init>(Lcom/netease/newsreader/activity/AccountRegister;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerHandler:Landroid/os/Handler;

    .line 44
    return-void
.end method

.method private Tips(Ljava/lang/String;)V
    .locals 1
    .parameter "message"

    .prologue
    .line 224
    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 225
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/activity/AccountRegister;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 46
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->regUserName:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/activity/AccountRegister;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 52
    iput-object p1, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$10(Lcom/netease/newsreader/activity/AccountRegister;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 49
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/AccountRegister;->loginsuccess:Z

    return-void
.end method

.method static synthetic access$2(Lcom/netease/newsreader/activity/AccountRegister;)Landroid/widget/EditText;
    .locals 1
    .parameter

    .prologue
    .line 47
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->regPassword:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$3(Lcom/netease/newsreader/activity/AccountRegister;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 53
    iput-object p1, p0, Lcom/netease/newsreader/activity/AccountRegister;->password:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$4(Lcom/netease/newsreader/activity/AccountRegister;)Z
    .locals 1
    .parameter

    .prologue
    .line 126
    invoke-direct {p0}, Lcom/netease/newsreader/activity/AccountRegister;->checkAccountInfor()Z

    move-result v0

    return v0
.end method

.method static synthetic access$5(Lcom/netease/newsreader/activity/AccountRegister;Landroid/app/ProgressDialog;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 51
    iput-object p1, p0, Lcom/netease/newsreader/activity/AccountRegister;->proDialog:Landroid/app/ProgressDialog;

    return-void
.end method

.method static synthetic access$6(Lcom/netease/newsreader/activity/AccountRegister;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter

    .prologue
    .line 51
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->proDialog:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic access$7(Lcom/netease/newsreader/activity/AccountRegister;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 223
    invoke-direct {p0, p1}, Lcom/netease/newsreader/activity/AccountRegister;->Tips(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$8(Lcom/netease/newsreader/activity/AccountRegister;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 52
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$9(Lcom/netease/newsreader/activity/AccountRegister;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 53
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->password:Ljava/lang/String;

    return-object v0
.end method

.method private checkAccountInfor()Z
    .locals 6

    .prologue
    const/4 v5, 0x6

    .line 127
    const/4 v2, 0x0

    .line 129
    .local v2, result:Z
    const-string v3, ""

    iget-object v4, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_0

    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    if-nez v3, :cond_1

    .line 130
    :cond_0
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerHandler:Landroid/os/Handler;

    const/4 v4, 0x1

    invoke-virtual {v3, v4}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 147
    :goto_0
    return v2

    .line 131
    :cond_1
    const-string v3, ""

    iget-object v4, p0, Lcom/netease/newsreader/activity/AccountRegister;->password:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_2

    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->password:Ljava/lang/String;

    if-nez v3, :cond_3

    .line 132
    :cond_2
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerHandler:Landroid/os/Handler;

    const/4 v4, 0x3

    invoke-virtual {v3, v4}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0

    .line 135
    :cond_3
    const-string v3, "^[a-zA-Z]+[a-zA-Z0-9_]{4,16}[a-zA-Z0-9]+$"

    invoke-static {v3}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v1

    .line 136
    .local v1, pattern:Ljava/util/regex/Pattern;
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v0

    .line 137
    .local v0, matcher:Ljava/util/regex/Matcher;
    invoke-virtual {v0}, Ljava/util/regex/Matcher;->find()Z

    move-result v3

    if-eqz v3, :cond_4

    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    if-lt v3, v5, :cond_4

    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->username:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    const/16 v4, 0x12

    if-le v3, v4, :cond_5

    .line 138
    :cond_4
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerHandler:Landroid/os/Handler;

    const/4 v4, 0x2

    invoke-virtual {v3, v4}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0

    .line 139
    :cond_5
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->password:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    if-lt v3, v5, :cond_6

    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->password:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    const/16 v4, 0x10

    if-le v3, v4, :cond_7

    .line 140
    :cond_6
    iget-object v3, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerHandler:Landroid/os/Handler;

    const/4 v4, 0x4

    invoke-virtual {v3, v4}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    goto :goto_0

    .line 142
    :cond_7
    const/4 v2, 0x1

    goto :goto_0
.end method

.method private findViewsById()V
    .locals 1

    .prologue
    .line 85
    const v0, 0x7f0c0027

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/activity/AccountRegister;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->regUserName:Landroid/widget/EditText;

    .line 86
    const v0, 0x7f0c0028

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/activity/AccountRegister;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->regPassword:Landroid/widget/EditText;

    .line 87
    const v0, 0x7f0c002a

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/activity/AccountRegister;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->regSubmit:Landroid/widget/Button;

    .line 89
    const v0, 0x7f0c0029

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/activity/AccountRegister;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/CheckBox;

    iput-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->register_box:Landroid/widget/CheckBox;

    .line 90
    return-void
.end method


# virtual methods
.method public goBackClick(Landroid/view/View;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 151
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/AccountRegister;->finish()V

    .line 152
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3
    .parameter "savedInstanceState"

    .prologue
    .line 69
    invoke-super {p0, p1}, Lcom/netease/newsreader/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 70
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/AccountRegister;->requestWindowFeature(I)Z

    .line 71
    const v1, 0x7f030006

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/AccountRegister;->setContentView(I)V

    .line 72
    invoke-direct {p0}, Lcom/netease/newsreader/activity/AccountRegister;->findViewsById()V

    .line 74
    iget-object v1, p0, Lcom/netease/newsreader/activity/AccountRegister;->regSubmit:Landroid/widget/Button;

    iget-object v2, p0, Lcom/netease/newsreader/activity/AccountRegister;->registerListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 75
    iget-object v1, p0, Lcom/netease/newsreader/activity/AccountRegister;->register_box:Landroid/widget/CheckBox;

    iget-object v2, p0, Lcom/netease/newsreader/activity/AccountRegister;->passwordVisiblyListener:Landroid/widget/CompoundButton$OnCheckedChangeListener;

    invoke-virtual {v1, v2}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 77
    iget-object v1, p0, Lcom/netease/newsreader/activity/AccountRegister;->regUserName:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->requestFocus()Z

    .line 78
    const-string v1, "input_method"

    invoke-virtual {p0, v1}, Lcom/netease/newsreader/activity/AccountRegister;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    .line 79
    .local v0, imm:Landroid/view/inputmethod/InputMethodManager;
    iget-object v1, p0, Lcom/netease/newsreader/activity/AccountRegister;->regUserName:Landroid/widget/EditText;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->showSoftInput(Landroid/view/View;I)Z

    .line 81
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 156
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->proDialog:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->proDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 157
    iget-object v0, p0, Lcom/netease/newsreader/activity/AccountRegister;->proDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    .line 158
    :cond_0
    invoke-super {p0}, Lcom/netease/newsreader/activity/BaseActivity;->onDestroy()V

    .line 159
    return-void
.end method
